{% extends 'user/user.html' %} 
{% load static %}
{% block haed_files %}
        <link rel="stylesheet" href="{% static 'css/index_mine.css' %}" />
        <link rel="stylesheet" href="{% static 'css/index_swiper.css' %}" />
{% endblock haed_files %}
{% block title %}首页{% endblock title %}
{% block page_title %}首页{% endblock page_title %}
{% block index_cart %}
<div class="cart_mine">
                <a href="{% url 'cart:cart' %}">
                    <div>
                        <img class="goal_cart_img" src="{% static 'image/购物车.png' %}" alt="" />
                        我的购物车
                    </div>
                </a>
                <p>{{cart_count}}</p>
            </div>  
{% endblock index_cart %}
{% block index_block %} 
<a class="to-top">Top</a>
<div class="index_content">
            <div class="landscape_navigation">
                <div class="contain">
                    <div>全部商品分类</div>
                    <ul>
                        <li>
                            <a href="">首页</a>
                        </li>
                        <li>|</li>
                        <li>
                            <a href="">手机生鲜</a>
                        </li>
                        <li>|</li>
                        <li>
                            <a href="">抽奖</a>
                        </li>
                    </ul>
                </div>
            </div>
            <main>
                <div class="portrait_navigation">
                    <div class="top_slider">
                        <ul>
                            {% for type in types %}
                            <li>
                                <a class="{{ type.logo }}" href="{% url 'goods:list' type.id %}">{{type.name}}</a>
                            </li>
                            {% endfor %}
                        </ul>
                        <div class="swiper-contione">
                            <div class="swiper">
                                {% for good in goods_banners %}
                                    <div class="swiper-item">
                                    <img src="{{ good.image.url }}" />
                                    <p>{{ good.sku.name }}</p>
                                </div>
                                {% endfor %}
                            </div>
                            <div class="swiper-point">
                                <div class="swiper-point-item">
                                    <div class="point active"></div>
                                    <div class="point"></div>
                                    <div class="point"></div>
                                    <div class="point"></div>
                                </div>
                            </div>
                            <div class="swiper-left">
                                <img src="{% static 'image/left.png' %}" />
                            </div>
                            <div class="swiper-right">
                                <img src="{% static 'image/right.png' %}" />
                            </div>
                        </div>
                        <div class="advertising">
                            {% for banner in promotion_banners %}
                                <a href=""><img src="{{banner.image.url}}" alt="" /></a>
                            {% endfor %}
                        </div>
                    </div>
                </div>
                <div class="classification_display">
                    <ul>
                        {% for type in types %}
                            <li>
                            <div class="title_bar">
                                <div class="title"><a href="{% url 'goods:list' type.id %}">{{type.name}}</a></div>
                                <div class="classification">
                                    <ul>
                                        {% for title in type.title_banners %}
                                            <li>
                                                <a href="{% url 'goods:detail' title.sku.id %}">{{title.sku.name}}</a>
                                            </li>
                                        {% endfor %}
                                    </ul>
                                    <a href="{% url 'goods:list' type.id %}">查看更多>></a>
                                </div>
                            </div>
                            <div class="display_bar">
                                <div class="introduction_bits">
                                    <a href="{% url 'goods:list' type.id %}"><img src="{{type.image.url}}" alt=""></a>
                                </div>
                                <ul>
                                    {% for picture in type.picture_banners %}
                                        <li>
                                        <a href="{% url 'goods:detail' picture.sku.id %}"><img src="{{ picture.sku.image.url }}" alt=""></a>
                                            <a class="name" href="{% url 'goods:detail' picture.sku.id %}">{{ picture.sku.name }}</a>
                                        <div>{{picture.sku.desc}}</div>
                                        <div class="price">￥{{ picture.sku.price }}</div>
                                    </li>
                                    {% endfor %}
                                </ul>
                            </div>
                        </li>
                        {% endfor %}
                    </ul>
                </div>
            </main>
        </div>
{% endblock index_block %}
{% block bottom_file %}
<script src="{% static 'js/index_swiper.js' %}"></script>
<script src="{% static 'js/to_top_jquery.toTop.min.js' %}"></script>
<script>
$('.to-top').toTop();
</script>
{% endblock bottom_file %}
